<?php include $this->admin_tpl("header"); ?>
<link rel="stylesheet" type="text/css" href="<?php echo JS_PATH;?>EasyUI/themes/haidaoblue/easyui.css">
<script type="text/javascript" src="<?php echo JS_PATH;?>EasyUI/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<?php echo JS_PATH;?>EasyUI/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<?php echo JS_PATH;?>EasyUI/hd_default_config.js"></script>
<div class="content">
<div class="site"> <?php echo C('site_name')?> <a href="#">返利中心</a> > 自动返利配置 </div>
<span class="line_white"></span>
<div class="install mt10 reg_login">
  <dl>
    <dd>
      <form name="form" method="post" action="<?php echo U('Rebate/sellset') ?>">
        <ul class="web p0">
          <li> <strong>是否系统自动发放：</strong> <b>
            <label>
              <input type="radio" name="status" id="status" value="1"  <?php if($info["status"]==1)echo ' checked="checked"';?>/>
              是 </label>
            &nbsp;&nbsp;
            <label>
              <input type="radio" name="status" id="status" value="0"  <?php if($info["status"]==0)echo ' checked="checked"';?>/>
              否 </label>
            </b> <span style="margin-left:-1px" class="red">选择是否允许系统自动发放</span> </li>
           <li>
                        <strong>总营业额：</strong>
                        <b><?php echo $amount_all;?>元</b>
                        <span style="margin-left:-1px" class="red">系统开业至今的总营业额</span>
                    </li>
                     <li>
                        <strong>平台总返利：</strong>
                        <b><?php echo $return_money==""?"0.00":$return_money;?>元</b>
                        <span style="margin-left:-1px" class="red">系统开业至今的总返利金额</span>
                    </li>
                    <li>
                        <strong>昨日线下商家营业额：</strong>
                        <b><?php echo $amount_yesterday;?>元</b>
                        <span style="margin-left:-1px" class="red">昨日线下商家营业额</span>
                    </li>
                 
                     <li>
                        <strong>系统待返赠送权数：</strong><?php echo $return_num;?><span style="margin-left:2px" class="red">个</span>
                    </li>  
          <li> <strong>赠送积分时间：</strong> <b class="u_typs_radio">
            <select name="open_time1">
              <?php
						   for($i=0;$i<24;$i++){
							   ?>
              <option value="<?php echo $i;?>"   <?php if($info["open_time1"]==$i)echo ' selected="selected"';?>><?php echo $i;?>点</option>
              <?php
							}
						   ?>
            </select>
            <select name="open_time2">
              <?php
						   for($i=1;$i<60;$i++){
							   ?>
              <option value="<?php echo $i;?>" <?php if($info["open_time2"]==$i)echo ' selected="selected"';?>><?php echo $i;?>分</option>
              <?php
							}
						   ?>
            </select>
            </b> <span style="margin-left:-1px" class="red">选择赠送积分时间（修改赠送时间请联系系统开发客服人员）</span> </li>
          <li> <strong>赠送积分方式：</strong> <b class="u_typs_radio">
            <label>
              <input type="radio" name="return_type" id="return_type" value="1"  <?php if($info["return_type"]==1)echo ' checked="checked"';?>/>
              固定分红 </label>
            <label>
              <input type="radio" name="return_type" id="return_type" value="2" <?php if($info["return_type"]==2)echo ' checked="checked"';?>/>
              比例 </label>
            </b> <span style="margin-left:-1px" class="red">选择赠送积分方式</span> </li>
          <li class="u_type_1"   <?php if($info["return_type"]==2)echo ' style="display:none"';?>> <strong>强制每个赠送权价格：</strong>
            <input type="text" class="text_input" name="return_money" value="<?php echo $info["return_money"]?>" />
            <span style="margin-left:2px">元</span> </li>
          <li class="u_type_2"  <?php if($info["return_type"]==1)echo ' style="display:none"';?>> <strong>商家营业额1%用于返现的比例：</strong>
            <input type="text" value="<?php echo $info["return_per"]?>"  class="text_input" name="return_per" id="return_per" />
            <span style="margin-left:2px">%&nbsp;&nbsp;如填写50%，商户做单总金额1000元，5个赠送权，总分红金额为为:1000*0.01*0.5/5=1元</span> </li>
        </ul>
        <div class="input1">
          <input type="submit" value="提交" class="button_search">
        </div>
        <script type="text/javascript">
				$(function(){
					$(".u_typs_radio input").click(function(){
						if($(this).val()==2){
							$(".u_type_1").hide()
							$(".u_type_2").show()
						}else{
							$(".u_type_2").hide()	
							$(".u_type_1").show()
						}
					})	
				})
				</script>
      </form>
    </dd>
  </dl>
  <?php include $this->admin_tpl("copyright"); ?>
  <div class="clear"></div>
</div>
<script>  
    //切换
    $(window).load(function() {
        var tabTitle = ".reg_login dt a";
        var tabContent = ".reg_login dd";
        $(tabTitle).bind("click", function() {
            $(this).siblings("a").removeClass("hover").end().addClass("hover");
            var index = $(tabTitle).index($(this));
            $(tabContent).eq(index).show().siblings(tabContent).hide();
            $(window).resize();
        });
    });
</script>